-
Notifications
You must be signed in to change notification settings - Fork 0
Update and fix information logged in the JSON format #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some commentary ... 💬
'"host":"$host",' | ||
'"http_connection":"$http_connection",' | ||
'"http_referrer":"$http_referer",' | ||
'"http_referer":"$http_referer",' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the HTTP referer Wikipedia page ...
The misspelling of referrer was introduced in the original proposal by computer scientist Phillip Hallam-Baker to incorporate the field into the HTTP specification. The misspelling was set in stone by the time of its incorporation into the Request for Comments standards document RFC 1945; document co-author Roy Fielding has remarked that neither "referrer" nor the misspelling "referer" were recognized by the standard Unix spell checker of the period.
'{' | ||
'"body_bytes_sent":"$body_bytes_sent",' | ||
'"host":"$host",' | ||
'"http_connection":"$http_connection",' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it would be nice to see what the value of the Connection
header is set to. Currently there's no way to see what it is. I also thought of the adding one for the protocol version but we can get that from the request
attribute who's value includes the protocol i.e. GET / HTTP/1.1
as shown below.
{
"body_bytes_sent": "1253",
"host": "test.example.com",
"http_referrer": "",
"http_user_agent": "Mozilla/5.0 (apple-x86_64-darwin20.1.0) Siege/4.0.7",
"http_x_forwarded_for": "105.163.39.239",
"proxy_x_forwarded_port": "443",
"proxy_x_forwarded_proto": "https",
"proxy_x_forwarded_ssl": "on",
"proxy_x_request_id": "eaec9ce4b52e915d59248fa2de3aa301",
"remote_addr": "10.23.72.250",
"remote_user": "",
"request": "GET / HTTP/1.1",
"request_length": "313",
"request_time": "0.002",
"status": "200",
"time_iso8601": "2021-02-19T10:26:08+00:00"
}
49e5647
to
8fbeba3
Compare
'"http_connection":"$http_connection",' | ||
'"http_referer":"$http_referer",' | ||
'"http_user_agent":"$http_user_agent",' | ||
'"http_x_amzn_trace_id":"$http_x_amzn_trace_id",' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way, one can correlate the X-Request-Id
with the X-Amzn-Trace-Id
(if it exists).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
'"host":"$host",' | ||
'"http_referrer":"$http_referer",' | ||
'"http_connection":"$http_connection",' | ||
'"http_referer":"$http_referer",' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The note on the misspelling is interesting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
Title says it all. See commits for details, each commit is an idea.